package com.jd.cs.vo;

import com.jd.cs.common.Const;
import com.jd.cs.common.ThreadLocalUtil;
import com.jd.cs.error.ErrorCode;
import lombok.Getter;

/**
 * @author: lizhiwei
 * @date: 2020-06-22 15:34
 **/
@Getter
public class ResultVO<T> {
    /**
     * 状态码，比如10000代表响应成功
     */
    private String code;
    /**
     * 响应信息，用来说明响应情况
     */
    private String msg;
    /**
     * 响应的具体数据
     */
    private T data;


    public ResultVO(ErrorCode code, T data) {
        this.code = code.getCode();
        this.msg = code.getMsg();
        this.data = data;
    }
}